package com.sdgs.paas.sdk.core.web.client;

import java.util.Map;
import java.util.function.Function;

import org.springframework.http.ResponseEntity;
import org.springframework.http.client.AsyncClientHttpRequestFactory;

/**
 * 异步查询帮助类接口
 *
 * @author wjj
 *
 */

public interface IPaasAsyncQueryHelper {

	<T, K> K asyncQueryForEntity(Map<String, PaasAsyncQueryRequest<T>> paasAsyncQueryRequests, int timeout,
			Function<Map<String, ResponseEntity<T>>, K> callback) throws InterruptedException;
	
	void cfgAsyncClientHttpRequestFactory(AsyncClientHttpRequestFactory asyncRequestFactory);
	
	void cfgConcurrencyLimit(int concurrencyLimit);
	
}
